var Caracteristica = require('./model/Caracteristica');
var Aula = require('./model/Aula');
var Curso = require('./model/Curso');
var Asignador = require('./model/Asignador');

var canion   = "Cañon";
var canionHD = "CañonHD";

var monitor = "Monitor";
var monitorLCD = "MonitorLCD";

var pc 			= "PC";
var pcDeveloper = "PCDeveloper";

var pcReq		= "PC";

var c = new Curso("Curso Java",[pcDeveloper]);
var d = new Curso("Curso Costura ",[canionHD]);
var e = new Curso("Curso Excel",[pcReq,canion]);

var aula1 = new Aula(1,10, [pcDeveloper, canionHD]);
var aula2 = new Aula(2,10, [canionHD]);

var comp = new Asignador([aula1,aula2],[e,c]);
comp.asignar();

var auuuu = new Aula();
console.log(auuuu.getId()+"djsdfkajñfaiesfaipeuriauefiuasef  ");

var db = require('mongoskin').db('localhost:27017/rockband'); 



db.collection('au').insert(aula2);

//var ccc = db.collection('au').findOne({id:2});
 var r;
//db.collection('au').findOne({id:2}, function(err, result) {
//    console.log('Band members of Road Crew');
//    console.log("ok");
//    console.log(result);
//    result.protoype = Aula.prototype;
//    console.log(result);
////    console.log(result.cumple());
//    r = result;
//});


console.log("final: "+r);
console.log("<br /><br />fin");